
*** This file documents the replication data and code for the paper "Exporting, Abatement, and Firm-Level Emissions: Evidence from China's Accession to the WTO" by Joel Rodrigue, Dan Sheng and Yong Tan.  All of the code was run in version 16 of STATA and version Version 4.0.3 of R.


*******************************************************************************
* Part I: Data
******************************************************************************


-----------------------------------------------------------------------------------------------------------------------------------
1. "tables_comp.dta"
This dataset can be used replicates the results when controlling for prov-, year- , ownership- and industry-fixed effects (Columns 1-2 for so2 and columns 5-6 for dust in Tables 1-3). Due to data privacy restrictions, we fully drop firm identifiers in this dataset.

-----------------------------------------------------------------------------------------------------------------------------------
2. "tables_comp2.dta"
This  dataset can be used to replicate the results when controlling for firm fixed effects and conducting first-difference estimation (Columns 3-4 for so2 and columns 7-8 for dust in Tables 1-3). In this dataset, we exclude outlier firms where emissions are consistently in the top 0.5 percentile in multiple consecutive years.  Due to data privacy restrictions, we re-code the firm identifier to be "indc" in this dataset.

-------------------------------------------------------------------------------------------------------------------------------------------

3. "tables_mechanism.dta"
This dataset contains firm-level data for RD investment, captial vintage, energy consumption, energy imports, and imports of abatement equipment.  This data is used to replicate columns 2-11 of Table 5 (and Table A25 in the Appendix).
-------------------------------------------------------------------------------------------------------------------------------------------------

4. "environ_index.dta"
This dataset contains the across-country demand for clean production measurement, which is used to replicate columns 14-15 of Table 5 (And columns 14 and 15 of Table A25 in the Appendix)

------------------------------------------------------------------------------------------------------------------------------------------------------

5. "tables_mechanism_full.dta"
This dataset contains auxiliary variables (RD, capital vintage, demand for clean production, etc) used to replicates Columns 16-17 of Table 5 (columns 16 and 17 in Table A25 in the Appendix)



-----------------------------------------------------------------------------------------------------------------------------------------------------------

6. "summary.dta"
This dataset is used to report the summary statistics in Table A1 in the Appendix.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

7. "balance_sample.dta" and "balance_sample2.dta"
These two datasets contain firms that survive through the whole sample period and never switch their location.
Specifically:

7.1  "balance_sample.dta": replicate the results when controlling for prov-, year- , ownership- and industry-fixed effects (Columns 1-2 and 5-6 in table A9).
7.2  "balance_sample2.dta": replicate the results when controlling firm fixed effects and the first-difference specification (Columns 3-4 and 7-8 in table A9).
------------------------------------------------------------------------------------------------------------------------------------------------------------------
8. "Event_sample_balance" and "Event_sample_so2_dust" replicates the event-study in Tables A17-A20.

8.1 "Event_sample_balance": This dataset includes a balanced sample of composed of initial nonexporters.  Among exporting firms, the sample restricts attention to those that start exporting during the sample and continue exporting until the end of the sample period.

8.2 "Event_sample_so2_dust": This dataset includes a balanced sample of composed of initial nonexporters. Among exporting firms, this dataset includes firms that enter and exit export markets over the sample period. 

---------------------------------------------------------------------------------------------------------------------------------------------------------------
9 "correlation.dta"
This dataset is used to replicate the correlation across variables in Tables A21-A22.
This dataset contains variables including firm-level product-mix, energy import, etc, and is also be used to replicate table A23. 

----------------------------------------------------------------------------------------------------------------------------------------------------------------

10. "boot1.dta": 
This data is used for constructing bootstrap confidence intervals in the main text.
--------------------------------------------------------------------------------------------------------------------------

11. "boot_app1.dta" ,  "boot_app2.dta", "boot_app3.dta",  "boot_app4.dta", "boot_app5" and  "boot_app6"

This data is used for constructing bootstrap confidence intervals for the appendix.
Specifically, 

11.1 "boot_app1.dta" is used when controlling for province-, industry-, ownership- and year-fixed effects; (Table A3-Table A8)

11.2 "boot_app2.dta" is used when controlling for firm- and year-fixed effect and first-difference specification.  (Table A3-Table A8)

11.3 "boot_app3.dta" is used for the construction of bootstrap confidence intervals for the balanced sample and no location switching firms (columns 1-2 and 5-6 of Table A9)

11.4 "boot_app4.dta" is used for the construction of bootstrap confidence intervals for the balanced sample and no location switching firms (columns 3-4 and 7-8 of Table A9)

11.5 "boot_app5.dta" is used for the construction of bootstrap intervals for "initial-non-exporters and Differential Trends" (Table A12).

11.6 "boot_app6.dta" is used for the construction of bootstrap intervals for Table A23, which contains RD, captial vintage, imported energy, imported equipment, prodct_mix, env-demand information. 

---------------------------------------------------------------------------------------------------------------------------




***********************************************************************************************
Part II: Do files and R files
*************************************************************************************************
***************************************************************************************************
1. "Table1-3.do" replicates the results in Tables 1-3 of the main text.
---------------------------------------------------------------------------------------------
2. "Table 5. do" replicates the results in Table 5 of the main text.
----------------------------------------------------------------------------------------------
3. "bootstrap_main.do" replicates the bootstrap confidence intervals for Tables 1 and 3 in the main text.
--------------------------------------------------------------------------------------------
4. "bootstrap_app.do" replicates the bootstrap confidence intervals for the tables in the Appendix.
-------------------------------------------------------------------------------------------
5. "tfp_combine.do" re-estimate firm-level productivity when constructing bootstrap confidence intervals.
-----------------------------------------------------------------------------------------------------------
6. "summary.do" replicates the summary statistics in Appendix Table A1.
----------------------------------------------------------------------------------------------------
7. "TableA2-A16.do" replicates the results in Tables A2-A16 in the Appendix.
---------------------------------------------------------------------------------------------------------
8. "TableA17-A20.do" replicates the event study results in Table A17-A20 in the Appendix. 
------------------------------------------------------------------------------------------------------------------------
9. "TableA21-A23.do" replicates the correlation tables in Tables A21-A22 in the Appendix, and also replicates the exporting and emission-related Table A23.
----------------------------------------------------------------------------------------------------------------------
10. "Lasso.do" replicates the LASSO regressions in Table A24. Note that this program has to be run in STATA 16.
-------------------------------------------------------------------------------------------------------------------------------
11. "TableA25.do" replicates Table A25 in the Appendix.
---------------------------------------------------------------------------------------------------------------------------------
12. "alternative_IV.do" replicates Table A26 in the Appendix using alternative IVs.
*******************************************************************************************************************************

**************************************************************************************8
----------------------------------------------
Part III: Source Data Contact Information
-----------------------------------------------
1. Manufacturing, Production and Customs Data

The manufacturing and production surveys are collected by the National Bureau of Statistics.  The customs records are collected by the Chinese Customs Agency.  Both data sets are housed at a numerous Chinese universities.  A license to employ the data for research purposes was formally purchased by Nankai University and the raw data is housed onsite. To use the dataset through Nankai University, the reader can contact:

The Economic Experiment Teaching Center at Nankai University, 300071;
tel: +86-022-23509074; or +86-022-23508986;
Web: https://econlab.nankai.edu.cn/
email: mwtyq@nankai.edu.cn (Yuqing Tu) 

************************************************************************************
2. Environmental Data

Again, a license to employ the data for research purposes was formally purchased by Nankai University and the raw data is housed onsite. The same university contact information as listed above in (1) applies for this data set. 

The raw data was purchased by Nankai University from Beijing Century Jialan Technology and Trade Development Co., Ltd.  web: http://www.11467.com/beijing/co/483263.htm




